package dev.alm.spring01ioc;

import ch.qos.logback.core.CoreConstants;
import dev.alm.spring01ioc.entity.Person;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@Import(CoreConstants.class)
public class Spring01IocApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Spring01IocApplication.class, args);
//        System.out.println(run);
        Person bean = run.getBean(Person.class);
        System.out.println(bean);
//        String[] beanDefinitionNames = run.getBeanDefinitionNames();
//        for (String beanDefinitionName : beanDefinitionNames) {
//            System.out.println(beanDefinitionName);
//        }
    }

}
